#include <iostream>
#include <cstdlib>
#include <GLUT/glut.h>

#include "application.h"
#include "gui.h"

using namespace std;

int 
main(int argc, char **argv)
{
    application->Init(argc, argv);
    gfx->Init(application);
    
    /** Register GLUT callbacks with GLUI **/
    GLUI_Master.set_glutDisplayFunc(gfx->glutDisplay);
    GLUI_Master.set_glutReshapeFunc(gfx->glutReshape);
    GLUI_Master.set_glutMouseFunc(gfx->glutMouseClick);
    glutMotionFunc(gfx->glutMouseMotion);

    /** Register the Idle callback with GLUI (instead of with GLUT) **/
    GLUI_Master.set_glutIdleFunc(NULL);

    /** Draw program window **/
    gfx->drawProgramWindow(application);
   
    /** Tell GLUI window which other window to recognize as the main gfx window **/
   
    /** Now call the regular GLUT main loop **/
    glutMainLoop();
    
}


